﻿using drinking.Helpers;
using SqlSugar;

namespace drinking.Models
{
    /// <summary>
    /// 订单类
    /// </summary>

    [SugarTable("Order")]
    public class Order
    {
        /// <summary>
        /// 订单id
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int OrderId { get; set; }

        /// <summary>
        /// 订单编码, 设备通信用
        /// </summary>
        public string OrderCode { get; set; }

        /// <summary>
        /// 商户订单号，用于查询支付结果
        /// </summary>
        public string OutTradeNo { get; set; }

        /// <summary>
        /// 订单备注
        /// </summary>
        public string Remark { get; set; }


        /// <summary>
        /// 订单总价
        /// </summary>
        public decimal Amount { get; set; }

        /// <summary>
        /// 客户id
        /// </summary>
        public int CustomerId { get; set; }

        /// <summary>
        /// 门店id
        /// </summary>
        public int StoreId { get; set; }

        /// <summary>
        /// 门店名称
        /// </summary>
        public string StoreName { get; set; }

        /// <summary>
        /// 0: 创建订单  10：已支付订单  20：上位机获取  30：上位机下发（准备调制） 40 开始调制  50 调制完成
        /// </summary>
        public int OrderStatus { get; set; }

        /// <summary>
        /// 创建订单时间
        /// </summary>
        public string CreateTime { get; set; }

        /// <summary>
        /// 订单中饮品杯数
        /// </summary>

        public int ItemSize { get; set; }

        /// <summary>
        /// 支付时间
        /// </summary>
        public string PayTime { get; set; }


        /// <summary>
        /// 完成时间
        /// </summary>
        public string CompleteTime { get; set; }

        [SugarColumn(IsIgnore = true)]
        public List<OrderItem> OrderItems { get; set; }

    }
}




